import { INestApplication } from '@nestjs/common';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';

export default (app: INestApplication<any>) => {
  const options = new DocumentBuilder()
    .setTitle('Example Title')
    .setDescription('The API description')
    .setVersion('1.0')

    .build();
  const document = SwaggerModule.createDocument(app, options);
  SwaggerModule.setup('doc', app, document);
};
